const TOKEN = 'token';
const USERID = 'userId';
const USERINFO = 'userInfo';
const ROLE = 'role';
const ROUTES = 'routes';
const MODAL = 'modal';
const MODALTITLE = 'modalTitle';

export const setToken = (token) => {
  window.localStorage.setItem(TOKEN, token);
};
export const getToken = () => window.localStorage.getItem(TOKEN);
export const removeToken = () => window.localStorage.removeItem(TOKEN);


export const setUserId = id => {
  window.localStorage.setItem(USERID, id);
};
export const getUserId = () => window.localStorage.getItem(USERID);
export const removeUserId = () => window.localStorage.removeItem(USERID);


export const setUserInfo = userInfo => {
  window.localStorage.setItem(USERINFO, userInfo);
};
export const getUserInfo = () => window.localStorage.getItem(USERINFO);
export const removeUserInfo = () => window.localStorage.removeItem(USERINFO);


export const setRole = role => {
  window.localStorage.setItem(ROLE, role);
}
export const getRole = () => window.localStorage.getItem(ROLE);
export const removeRole = () => window.localStorage.removeItem(ROLE);


export const setRoutes = routes => window.localStorage.setItem(ROUTES, routes);
export const getRoutes = () => window.localStorage.getItem(ROUTES);
export const removeRoutes = () => window.localStorage.removeItem(ROUTES);

export const setModal = modal => window.localStorage.setItem(MODAL, modal);
export const getModal = () => window.localStorage.getItem(MODAL);
export const removeModal = () => window.localStorage.removeItem(MODAL);

export const setModalTitle = title => window.localStorage.setItem(MODALTITLE, title);
export const getModalTitle = () => window.localStorage.getItem(MODALTITLE);
export const removeModalTitle = () => window.localStorage.removeItem(MODALTITLE);
